import { createRouter, createWebHashHistory } from 'vue-router'
import login from '@renderer/views/login/index.vue'
const routes = [
  { path: '/', component: login },
  {
    path: '/main',
    component: () => import('@renderer/views/main/index.vue'),
    children: [
      {
        path: '/xwbl',
        component: () => import('@renderer/views/xwbl/index.vue')
      },
      {
        path: '/xwbl/edit',
        component: () => import('@renderer/views/xwbl/edit.vue')
      },
      {
        path: '/brbl',
        component: () => import('@renderer/views/brbl/index.vue')
      },
      {
        path: '/user',
        component: () => import('@renderer/views/user/index.vue')
      },
      {
        name: 'userEdit',
        path: '/user/edit',
        component: () => import('@renderer/views/user/edit.vue')
      },
      {
        name: 'print',
        path: '/print',
        component: () => import('@renderer/views/print/index.vue')
      },
      {
        name: 'printPreview',
        path: '/print/preview',
        component: () => import('@renderer/views/print/PrintPreview.vue')
      },
      {
        name: 'system',
        path: '/system',
        component: () => import('@renderer/views/system/index.vue')
      }
    ]
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
